<?php

namespace app\validate;

use think\Validate;

class User extends Validate{
	//创建验证规则
	protected $rule = [
			'name|姓名'=>[
					'require',		//必填
					'min'=>5,		//最短
					'max'=>20,		//最长
			],
			'email'=>[
					'require',
					'email',
			],
			'password'=>[
					'require',
					'min'=>6,
					'max'=>12,
					'alphaNum'		//只能使用字母（alpha）和数字（Num)
			],
			'mobile'=>[
					'require',
					'mobile',
			],
	];
	
	protected $message = [
			'name'=>'名字写错啦！！！',
	];
}